package com.bjpowernode.controller;

import javax.servlet.http.HttpSession;
import java.io.IOException;


public class OneServlet extends javax.servlet.http.HttpServlet {
    protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {
        String goodsName_key = request.getParameter("goodsName_csm");
        HttpSession session = request.getSession();
        Integer   goodsNum= (Integer) session.getAttribute(goodsName_key);
        if (goodsNum==null){
            session.setAttribute(goodsName_key,1);
        }else {
            session.setAttribute(goodsName_key,goodsNum+1);
        }
    }
}
